import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:image_picker/image_picker.dart';

import 'logic.dart';

class MePage extends StatelessWidget {
  final logic = Get.put(MeLogic());
  final state = Get.find<MeLogic>().state;
  final ImagePicker _picker = ImagePicker();

  MePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Flex(direction: Axis.vertical, children: [
      Expanded(
          flex: 1,
          child: Container(width: Size.infinite.width, color: Colors.green)),
      Expanded(
          flex: 1,
          child: Container(width: Size.infinite.width, color: Colors.blue)),
      Wrap(
          direction: Axis.horizontal,
          children: [Text("data" * 100), Text("hahha" * 100)]),
    ]);
  }

  Future<void> showImagePick(BuildContext context) async {
    var pickedFile = await _picker.pickImage(source: ImageSource.gallery);
    BrnToast.showInCenter(text: pickedFile?.path ?? "", context: context);
  }
}
